﻿using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace eLoan.Models
{
    [Table("CollectionReconciliation")]
    public class CollectionReconciliation : CollectionReconciliationFields
    { }

    public class CollectionReconciliationQueryModel : CollectionReconciliationFields
    {
        public string BranchName { get; set; }

        public string AgentName { get; set; }

        public string Status { get; set; }
    }

    public class CollectionOnRecord
    {
        public int AgentID { get; set; }

        public string AgentName { get; set; }

        public string BorrowerName { get; set; }

        public string DocumentNo { get; set; }

        public decimal PostedPayment { get; set; }

        public decimal Penalty { get; set; }
    }

    public class CollectionReconciliationFields
    {
        [Key]
        [DatabaseGeneratedAttribute(DatabaseGeneratedOption.Identity)]
        [Display(Name = "ID")]
        public int ID { get; set; }

        [Required]
        [Display(Name = "Branch Code")]
        public string BranchCode { get; set; }

        [Required]
        [Display(Name = "Agent ID")]
        public int AgentID { get; set; }

        [Required]
        [Display(Name = "Date")]
        public DateTime Date { get; set; }

        [Display(Name = "Total Collection Per Record")]
        public decimal TotalCollectionPerRecord { get; set; }

        [Display(Name = "Cash Deposited")]
        public decimal CashDeposited { get; set; }

        [Display(Name = "Deducted To Cheque Advance Payment")]
        public decimal DeductedToChequeAdvancePayment { get; set; }

        [Display(Name = "Deducted To Cheque Savings")]
        public decimal DeductedToChequeSavings { get; set; }

        [Display(Name = "Used For Loan Release")]
        public decimal UsedForLoanRelease { get; set; }

        [Display(Name = "Used In Withdrawal Of Savings")]
        public decimal UsedInWithdrawalOfSavings { get; set; }

        [Display(Name = "Others")]
        public decimal Others { get; set; }

        [Display(Name = "Remarks")]
        public string Remarks { get; set; }

        [Display(Name = "Total")]
        public decimal Total { get; set; }

        [Display(Name = "Difference")]
        public decimal Difference { get; set; }

        [Display(Name = "Status")]
        public int StatusID { get; set; }
    }

}